package com.touch.core;

public class NetConstants 
{	
	public static final byte END_CHAR = 0x03;
	public static final byte SEP_CHAR = 0x1f;
	
	public static final byte[] END_SEQ 					= {END_CHAR};
	public static final byte[] SEP_SEQ 					= {SEP_CHAR};
	public static final byte[] REQUEST_CONNECTION 		= {0x61, 0x72, 0x65, 0x71};
	public static final byte[] REQUEST_NEW_ACCOUNT 		= {0x7E, 0x61, 0x63, 0x63};
	public static final byte[] FAILED_MAKE_NEW_ACCOUNT 	= {0x66, 0x61, 0x63, 0x63};
	public static final byte[] REQUEST_LOGIN 			= {0x72, 0x6C, 0x7F, 0x67};
	public static final byte[] FAILED_LOGIN 			= {0x66, 0x6C, 0x7F, 0x67};
	public static final byte[] ACCOUNT_BANNED 			= {0x61, 0x62, 0x61, 0x7E};	
	public static final byte[] RANDOMIZE_STATS 			= {0x72, 0x73, 0x74, 0x61};
	public static final byte[] REQUEST_CLASS_LIST 		= {0x72, 0x63, 0x6C, 0x73};
	public static final byte[] REQUEST_CLASS_INFO 		= {0x72, 0x63, 0x69, 0x66};
	
	public static boolean compare(byte[] byteblock1, byte[] byteblock2)
	{
		if(byteblock1.equals(byteblock2))
			return true;		
		
		for(int i = 0; i < byteblock1.length; i++)
		{
			if(byteblock1[i] != byteblock2[i])
				return false;
		}
		return true;
	}
}
